package com.example.myapplication.vm

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

/**
 * 数据观察 --> lifecycle.ViewModel
 */
class MyVm(): ViewModel(){

    var id: MutableLiveData<Int> = MutableLiveData()
    var name:MutableLiveData<String> =  MutableLiveData()
    var persion:MutableLiveData<Person> = MutableLiveData()

    init {
        name = MutableLiveData();
        name.value = ""
    }
}